import { http } from '@/utils/http'

//评论点赞
export const addCanelLikesAPI= (data:any) => {
    return http({
        // url: 'article_list',
        url:'addCanelLikes',
        method: 'POST',
        header:{
          'Content-type': 'application/json',
        },
        data:data,
        urlType: 'kaiwu'
    })
  }
  
  //文章点赞 
  export const addCanelLikesByatAPI = (data:any)=>{
    return http({
        // url: 'article_list',
        url:'addCanelLikesByat',
        method: 'POST',
        header:{
          'Content-type': 'application/json',
        },
        data:data,
        urlType: 'kaiwu'
    })
  }

  //查看评论数据-文章
  export const getArticleCommentAPI= (data:any) => {
    return http({
      // url: 'article_list',
      url:`getArticleComment&aid=${data.tid}&page=1`,
      method: 'GET',
      urlType: 'kaiwu'
    //   data:data
    })
  }

  //查看评论数据-评论
  export const getPostAPI= (data:any) => {
    return http({
      // url: 'article_list',
      url:`getPost&tid=${data.tid}&page=1`,
      method: 'GET',
      urlType: 'kaiwu'
    //   data:data
    })
  }

  //添加评论-帖子

  export const threadPostAPI= (data:any) => {
    return http({
        // url: 'article_list',
        url:'threadPost',
        method: 'POST',
        header:{
          'Content-type': 'application/json',
        },
        data:data,
        urlType: 'kaiwu'
    })
  }

  //添加评论-文章

  export const articleCommentAPI= (data:any) => {
    return http({
        // url: 'article_list',
        url:'articleComment',
        method: 'POST',
        header:{
          'Content-type': 'application/json',
        },
        data:data,
        urlType: 'kaiwu'
    })
  }

  //收藏-文章-帖子
  export const addCanelFavAPI = (data:any) => {
    return http({
        // url: 'article_list',
        url:'addCanelFav',
        method: 'POST',
        header:{
          'Content-type': 'application/json',
        },
        data:data,
        urlType: 'kaiwu'
    })
  }
  
